import request from '@/utils/request'

export function brandgetAll(data) {
  return request({
    url: '/brand/getAll',
    method: 'post',
    data
  })
}

export function brandSave(data) {
  return request({
    url: '/brand/save',
    method: 'post',
    data
  })
}

export function brandUpdate(data) {
  return request({
    url: '/brand/update',
    method: 'post',
    data
  })
}

export function getDetail(id) {
    return request({
      url: '/brand/getById/'+id,
      method: 'get'
    })
}

export function brandDelete(data) {
    return request({
      url: '/brand/delete',
      method: 'post',
      data
    })
  }

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}

// 获取短信验证码
export function getCode(data) {
  return request({
    url: 'admin/getCode',
    method: 'post',
    data
  })
}

// 修改密码
export function changePwd(data) {
  return request({
    url: '/platform_user/updatePassword',
    method: 'post',
    data
  })
}
